package cn.tedu.boyou.common.util;

import cn.tedu.boyou.common.exception.LogicException;

public class AssertUtil {
    public static void hasLength(String value,String msg){
        if(value == null || "".equals(value.trim())){
            throw new LogicException(msg);
        }
    }

    public static void isEquals(String v1,String v2,String msg){
        if(v1 == null || v2 == null){
            throw new LogicException("传入的参数不能为空。");
        }

        if(!v1.equals(v2)){
            throw new LogicException(msg);
        }
    }

}
